<?php
namespace app\common\controller;

use think\Controller;
use think\Request;

class Common extends Controller
{
    public function __construct(Request $request = null)
    {
        parent::__construct($request);
    }

    public function checkRequest($type='get') {
        $request = request();
        if(strtolower($type) != strtolower($request->method())) {
            error('Illegal request',400);
        }
    }
}
